package group2assignone.view;

import javax.swing.*;

/**
 *
 * @author group2
 */
public class LoadingView extends OurView {

    private JLabel loading = new JLabel("Authenticating ");
    private static final long msWait = 500;

    public void addComponents() {
        centerPanel.add(loading);
    }

    public void animate() {
        loading.setText("Authenticating ");
        try {
            Thread.sleep(msWait);
        } catch (InterruptedException e) {
        }

        loading.setText("Authenticating .");
        try {
            Thread.sleep(msWait);
        } catch (InterruptedException e) {
        }

        loading.setText("Authenticating . .");
        try {
            Thread.sleep(msWait);
        } catch (InterruptedException e) {
        }

        loading.setText("Authenticating . . .");
        try {
            Thread.sleep(msWait);
        } catch (InterruptedException e) {
        }
    }
}
